package cn.itzzx.dubb.consumer.controller;

import cn.itzzx.dubbo.service.HelloService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 *
 * @author Martin
 * @since 1.0
 */
@RestController
public class ConsumerController {

    @Reference
    private HelloService helloService;

    @GetMapping("test/{name}")
    public String test(@PathVariable String name) {
        return helloService.sayHello(name);
    }

}
